#ifndef FBPOOL_H
#define FBPOOL_H


#include <fcntl.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <linux/videodev2.h>
#include <rga/RockchipRga.h>

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/imgproc/types_c.h>

#include <sys/ioctl.h>

#include <rga/im2d.hpp>
#include <rga/im2d_type.h>
#include <rga/RgaUtils.h>
#include <rga/rga.h>

#include "dma_alloc.h"

extern "C" {
#include "drm_display.h"
}
struct buffer {
        void *start;
        size_t length;
        struct v4l2_buffer v4l2_buf;
};
static unsigned int n_buffers;



int open_video(void);
void init_device(void);
void start_capturing(void);
int read_frame();

#endif // FBPOOL_H
